using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class TaskHistorysExtend
{
		public static ResponseTaskHistorysDto ToResponseDto(this TaskHistorys entity)
{			return new ResponseTaskHistorysDto
			{
				accountId = entity.ThAccountId,
				action = entity.ThAction,
				changedAt = entity.ThChangedAt,
				changedAtStr =Tools.TimeToString(entity.ThChangedAt),
				historyId = entity.ThHistoryId,
				oldValue = entity.ThOldValue,
				taskId = entity.ThTaskId,
			};
		}
	}
}
